//
//  SecondViewController.m
//  VEMsg
//
//  Created by sir 余 on 12/5/10.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//
#import "vwHistoryController.h"

@implementation vwHistoryController
@synthesize audioRecorder;

-(void) initRecorderSetup{
    audioRecorder = [[AudioRecorder	alloc] init];
}
- (IBAction) recordButtonTapped:(id)sender {
    NSLog(@"Record");
	[audioRecorder startRecording];
}

- (IBAction) recordButtonTouchUp:(id)sender {
	[audioRecorder stopRecording];
    NSLog(@"Record stop");
    self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2];
    //[self playerSetup];
    /*CGRect transparentViewFrame = CGRectMake(0.0, 0.0,360.0,480.0);
     VocViewController *vView = [[VocViewController alloc] init];
     vView.delegate = self;
     [self.view addSubview:vView.view];
     self.m_vocView = vView;
     [vView release];*/
	
}


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"History", @"History");
        self.tabBarItem.image = [UIImage imageNamed:@"History"];
    }
    return self;
}
							
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self initRecorderSetup];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
	[super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated
{
	[super viewDidDisappear:animated];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

@end
